package com.itcast.staticdemo.Demo01;

/*
要写注释哦!!!
*/
public class Demo01 {
    private double money;
    private String id;
    private static String belong;
    private static int number;

    {
        number++;
    }

    public Demo01() {
    }

    public Demo01(double money, String id) {
        this.money = money;
        this.id = id;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public static String getBelong() {
        return belong;
    }

    public static void setBelong(String belong) {
        Demo01.belong = belong;
    }

    public static int getNumber() {
        return number;
    }

    public static void setNumber(int number) {
        Demo01.number = number;
    }

    public void shopping(double tomoney, String thing) {
        System.out.println(this.id + "你现在还有：" + this.money);
        System.out.println(this.id + "在" + Demo01.belong + "你花了：" + tomoney + "买了" + thing + "现在还有:" + (this.money - tomoney) + "钱！");
    }
}
